package mason.dp.simplefactory;
/**
 * 包子店
 * @author MasonAir
 *
 */
public class BaoZiShop {
	private BaoZiSimpleFactory baoZiFactory;
	public BaoZiShop(BaoZiSimpleFactory f) {
		this.baoZiFactory = f;
	}
	public void oneBagOfBaoZiForTheCustomer(String type) {
		//使用工厂后，这里不再有具体类的实例化操作
		BaoZi bao = baoZiFactory.createBaoZi(type);
		bao.preapare();
		bao.make();
		bao.steam();
		bao.bag();
	}
}
